#include <at89c51RC2.h>

void Delay(unsigned int i)
{
	while(i--);
}

void main()
{
	unsigned char Time,i;
	while(1)
	{
		for(Time=0;Time<100;Time++)
		{
			for(i=0;i<20;i++)
			{
				P2_0=0;
				Delay(Time);
				P2_0=1;
				Delay(100-Time);
			}
		}
		for(Time=100;Time>0;Time--)
		{
			for(i=0;i<20;i++)
			{
				P2_0=0;
				Delay(Time);
				P2_0=1;
				Delay(100-Time);
			}
		}
	}
}

